package com.hsav.kcxb.adapter.manager;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.hsav.kcxb.R;
import com.hsav.kcxb.adapter.common.AbsListManager;
import com.hsav.kcxb.adapter.common.CommonViewHolder;
import com.hsav.kcxb.bean.CollectionBean;
import com.zhy.autolayout.utils.AutoUtils;

import java.util.List;

/**
 * Created by zhao on 17-4-29.
 */

public class CollectionManager extends AbsListManager {

    public CollectionManager(List dataList, int layoutId) {
        super(dataList, layoutId);
    }

    @Override
    public void bindDataView(View convertView, Object item) {
        if(convertView==null || item==null){
            return;
        }
        AutoUtils.autoSize(convertView);
        CollectionBean collectionBean = (CollectionBean) item;
        TextView songNameTx = (TextView) CommonViewHolder.get(convertView, R.id.text_song_name);
        ImageView headImg = CommonViewHolder.get(convertView,R.id.iv_atten_head);
        TextView userNameTx = (TextView)CommonViewHolder.get(convertView,R.id.tx_user_name);
        TextView singerNameTx = (TextView)CommonViewHolder.get(convertView,R.id.text_song_name);

        songNameTx.setText(collectionBean.getSongName());
        userNameTx.setText(collectionBean.getUserName());
        singerNameTx.setText(collectionBean.getSingerName());

    }
}
